package panel;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.util.ArrayList;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.RowSorter;
import javax.swing.border.Border;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;

import org.omg.CORBA.PUBLIC_MEMBER;

import file.DB;
import file.IOStreamStudent;
import listener.ScoreListener;
import model.Student;
public class ScorePage extends WorkingPanel{
	
	public static ScorePage instance=new ScorePage();
	
	JLabel score_name=new JLabel("期末考试成绩单");
	JLabel course=new JLabel("课程");
	JLabel course_name=new JLabel("面向对象程序设计");
	JLabel teacher=new JLabel("教师");
	JLabel teacher_name=new JLabel("梁早清");
	JLabel claxx=new JLabel("班级");
	JLabel clasxx_name=new JLabel("2017级软件工程专业3班");
	public JButton update=new JButton("查找");
	public JComboBox box=new JComboBox<>(new Object[]{"面向对象程序设计","C语言程序设计"});
	public JComboBox box2=new JComboBox<>(new Object[]{"梁早清","陈湘骥"});
	public JComboBox box3=new JComboBox<>(new Object[]{"2017级软件工程专业3班","2017级软件工程专业1班"});
	
	@Override
	public void updateData() {
		
	}

	@Override
	public void addListener() {
		
	}
	public ScorePage(){
		
		score_name.setFont(new Font("宋体", Font.BOLD, 20));
		course_name.setFont(new Font("宋体", Font.BOLD, 15));
		clasxx_name.setFont(new Font("宋体", Font.BOLD, 15));
		teacher_name.setFont(new Font("宋体", Font.BOLD, 15));	
		this.setLayout(new BorderLayout());
        JPanel upPanel1=new JPanel();
        JPanel upPanel2=new JPanel();
        JPanel upPanel3=new JPanel();
        JPanel upPanel4=new JPanel();
        JPanel up=new JPanel();
        upPanel1.add(score_name,BorderLayout.NORTH);
        upPanel2.add(course);
        upPanel2.add(box);
        upPanel3.add(teacher);
        upPanel3.add(box2);
        upPanel4.add(claxx);
        upPanel4.add(box3);      
        ScoreListener listener=new ScoreListener();
        update.addActionListener(listener);       
        up.add(upPanel1);
        up.add(upPanel2);
        up.add(upPanel3);
        up.add(upPanel4);
        up.add(update);
        JPanel centerPanel=new JPanel();
        this.add(up,BorderLayout.CENTER);
        setVisible(true);
	}
	public static void main(String[] args){
		ScorePage.instance.setVisible(true);
	}
	
}
